import { configureStore, Action, ThunkAction } from "@reduxjs/toolkit"
import countReducer from "./counterSlice"
let store = configureStore({
    reducer: {
        counter: countReducer
    }
})

//导出类型

export type appDispatch = typeof store.dispatch;

export type rootState = ReturnType<typeof store.getState>

export type appThunk<ReturnType = void> = ThunkAction<
    ReturnType,
    rootState,
    unknown,
    Action<string>
>
export default store